﻿@page "/counter"
@using BlazorApp4.UIThemeClasses;

<PageTitle>Counter</PageTitle>

<h1>Counter</h1>

<p role="status">Current count: @currentCount</p>

<button class="btn" @onclick="IncrementCount"> Increment Counter (Unthemed)</button>


<p>
    <button 
        class="btn @(themeInfo is not null ? themeInfo.ButtonClass : string.Empty)" 
        @onclick="IncrementCount">
        Increment Counter (Themed)
    </button>
</p>

@code {
    private int currentCount = 0;

    [CascadingParameter]
    public ThemeInfo themeInfo { get; set; }

    private void IncrementCount()
    {
        currentCount++;
    }
}
